package com.system.honour.mapper;

import com.system.honour.beans.PageQuery;
import com.system.honour.entity.SysUser;
import com.system.honour.entity.SysUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SysUserMapper {
    long countByExample(SysUserExample example);

    int deleteByExample(SysUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    List<SysUser> selectByExample(SysUserExample example);

    SysUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example);

    int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser getUser(@Param("username") String username);

    //分页全部数
    List<SysUser> getUserByPage(@Param("page")PageQuery page);

    Integer countAllUser();

    Integer countByTelephone(@Param("Telephone")String Telephone, @Param("userId")Integer userId);

    SysUser getByTelephone(@Param("Telephone")String Telephone);

    //分页模糊查询
    List<SysUser> getUserByVague(@Param("page")PageQuery page,@Param("username")String username);
    Integer countByVague(@Param("username")String username);

}